package lab02.test12;

/**
 * Created by 14394 on 2017/10/20.
 */
public class Rectangular extends Shape {
    //宽和高
    private float width;
    private float heigth;

    @Override
    public float area() {
        return  width*heigth;
    }

    public Rectangular(float width, float heigth) {
        this.width = width;
        this.heigth = heigth;
    }

    @Override
    public float perimeter() {
        return 2*(width+heigth);

    }
}
